package com.xiaoran.springbt02web.controller;

import com.xiaoran.springbt02web.bean.Persion;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class HelloController {
    @RequestMapping(value = "/user",method = RequestMethod.GET)
    public String test1(){
        return "GET-张三";
    }
    @RequestMapping(value = "/user",method = RequestMethod.DELETE)
    public String test2(){
        return "DELETE-张三";
    }
    @RequestMapping(value = "/user",method = RequestMethod.POST)
    public String test3(){
        return "POST-张三";
    }
    @RequestMapping(value = "/user",method = RequestMethod.PUT)
    public String test4(){
        return "PUT-张三";
    }

    @PostMapping("/saveuser")
    public Persion test5(Persion persion){
        return persion;
    }

}
